<template>
  <view style="margin: 20rpx">
    <mp-html :content="desc" container-style="overflow:hidden"></mp-html>
    <div v-if="!desc" class="empty-order">
      <gui-image
        src="https://cdn.duyumy.com/accessory/0fe61301ec884459440a85e2fcd72d1ae98c46da.png"
      ></gui-image>
      <div style="font-size: 28rpx; color: #999; margin-top: -20rpx">
        暂无数据,请到后台设置~
      </div>
    </div>
  </view>
</template>
<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { getAboutUs } from "@/apiShop/mine.js";
const desc = ref("");

onLoad(async () => {
  const res = await getAboutUs();
  desc.value = (res || "")
    .replace(/\<img/g, "<img style='max-width:100%;'")
    .replace(/\.jpg/g, ".jpg");
  desc.value = res;
});
</script>
<style lang="scss">
.empty-order {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
  flex-direction: column;
}
</style>